package cn.wolfcode.transfer.domain;

import java.util.List;

public class Exam {
    /** */
    private Long id;

    /** 试卷名称*/
    private String title;

    /** 考试时长*/
    private Integer examMinute;

    /** 试卷总分*/
    private Integer totalScore = 0;
    //题目
    private List<ExamQuestion> examQuestions;

    public List<ExamQuestion> getExamQuestions() {
        return examQuestions;
    }

    public void setExamQuestions(List<ExamQuestion> examQuestions) {
        for (ExamQuestion examQuestion : examQuestions) {
            this.totalScore += examQuestion.getScore();
        }
        this.examQuestions = examQuestions;
    }

    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public String getTitle() {
        return title;
    }

    public void setTitle(String title) {
        this.title = title;
    }

    public Integer getExamMinute() {
        return examMinute;
    }

    public void setExamMinute(Integer examMinute) {
        this.examMinute = examMinute;
    }

    public Integer getTotalScore() {
        return totalScore;
    }

    public void setTotalScore(Integer totalScore) {
        this.totalScore = totalScore;
    }
}